package com.zan.pattern.factory.abstract_factory;

/**
 * @Author Zan
 * @Create 2024/4/24 21:37
 * @Description : TODO(请用一句话描述该类的功能)
 * @ClassName: Client
 */
public class Client {
    public static void main(String[] args) {
        // 创建意大利风味甜品工厂
//        ItalyDessertFactory factory = new ItalyDessertFactory();
        // 创建美式风味甜品工厂
        AmericanDessertFactory factory = new AmericanDessertFactory();
        // 获取拿铁咖啡 + 提拉米苏
        Coffee coffee = factory.createCoffee();
        Dessert dessert = factory.createDessert();

        System.out.println(coffee.getName());
        dessert.show();
    }
}
